/**
 * Copyright (C) 2017 - 2020 https://github.com/joewee
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.bifrost.entity;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * 系统日志记录表
 *
 * @author joewee
 * @version 1.0.0
 * @Date 2017/10/21 20:30
 */
@Entity
@Table(name = "SYSTEM_LOG")
@NamedQuery(name = "SystemLog.findAll", query = "SELECT s FROM SystemLog s")

public class SystemLog implements Serializable {

    private static final long serialVersionUID = 6722666338842638408L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "ID", unique = true, nullable = false)
    private Long id;
    //用户名
    @Column(name = "CUSTOMER_ID", length = 20)
    private Long customerId;
    //用户操作
    @Column(name = "OPERATION", length = 255)
    private String operation;
    //请求方法
    @Column(name = "METHOD", length = 255)
    private String method;
    //请求参数
    @Column(name = "PARAMS", length = 255)
    private String params;
    //IP地址
    @Column(name = "IP", length = 64)
    private String ip;
    //创建时间
    @Column(name = "CREATE_DATE")
    private Date createDate;
    //异常文件
    @Column(name = "ERRFILE", length = 64)
    private String errFile;
    //异常行号
    @Column(name = "ERRLINE", length = 32)
    private String errLine;

    /**
     * 设置：
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 获取：
     */
    public Long getId() {
        return id;
    }

    /**
     * 设置：id
     */
    public Long getCustomerId() {
        return customerId;
    }

    public void setCustomerId(Long customerId) {
        this.customerId = customerId;
    }

    /**
     * 设置：用户操作
     */
    public void setOperation(String operation) {
        this.operation = operation;
    }

    /**
     * 获取：用户操作
     */
    public String getOperation() {
        return operation;
    }

    /**
     * 设置：请求方法
     */
    public void setMethod(String method) {
        this.method = method;
    }

    /**
     * 获取：请求方法
     */
    public String getMethod() {
        return method;
    }

    /**
     * 设置：请求参数
     */
    public void setParams(String params) {
        this.params = params;
    }

    /**
     * 获取：请求参数
     */
    public String getParams() {
        return params;
    }

    /**
     * 设置：IP地址
     */
    public void setIp(String ip) {
        this.ip = ip;
    }

    /**
     * 获取：IP地址
     */
    public String getIp() {
        return ip;
    }

    /**
     * 设置：创建时间
     */
    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    /**
     * 获取：创建时间
     */
    public Date getCreateDate() {
        return createDate;
    }

    public String getErrFile() {
        return errFile;
    }

    public void setErrFile(String errFile) {
        this.errFile = errFile;
    }

    public String getErrLine() {
        return errLine;
    }

    public void setErrLine(String errLine) {
        this.errLine = errLine;
    }
}
